export default {
    state: {
        openModal: !localStorage.getItem('openModal') || localStorage.getItem('openModal') === 'true',
        openToolHistory: !localStorage.getItem('openToolHistory') || localStorage.getItem('openToolHistory') === 'true'
    },
    mutations: {
        setOpenModal: (state, value) => {
            state.openModal = value;
            localStorage.setItem('openModal', value);
        },
        setOpenToolHistory: (state, value) => {
            state.openToolHistory = value;
            localStorage.setItem('openToolHistory', value);
        }
    },
    getters: {
        getOpenModal: state => {
            return state.openModal
        },
        getOpenToolHistory: state => {
            return state.openToolHistory;
        }
    }
}
